﻿using Domain.Entity.user;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Repository.User
{
    public class UserRepository : IUserRepository
    {
        private readonly MyDbContext myDbContext;

        public UserRepository( MyDbContext myDbContext) 
        {
            this.myDbContext = myDbContext;
        }
        public async Task<Users> GetUsers(Users users)
        {
           Users users1=myDbContext.users.Where(e=>e.UName==users.UName&&e.UPassWord==users.UPassWord).FirstOrDefault();
            return users1;
        }
    }
}
